# refenencs:
# https://github.com/pytorch/vision/issues/2245




import torch
import torchvision.models as models

vgg16 = models.vgg16(pretrained=False)

vgg16.eval()

in_tensor = torch.rand(size=(10, 3, 224, 224))
out_tensor = vgg16.forward(in_tensor)

print(out_tensor)

traced_script_module = torch.jit.trace(vgg16, in_tensor)  
traced_script_module.save("take_vgg16_model.pt")
